/*
███████╗██╗   ██╗ ██████╗██╗  ██╗
██╔════╝██║   ██║██╔════╝██║ ██╔╝
█████╗  ██║   ██║██║     █████╔╝ 
██╔══╝  ██║   ██║██║     ██╔═██╗ 
██║     ╚██████╔╝╚██████╗██║  ██╗
╚═╝      ╚═════╝  ╚═════╝╚═╝  ╚═╝
*/
package test;

import java.io.InputStream;
import java.util.Properties;

public class JdbcCheck {
    public static void main(String[] args) throws Exception {
        try (InputStream in = JdbcCheck.class.getClassLoader()
                .getResourceAsStream("jdbc.properties")) {
            if (in == null) {
                System.out.println("❌ 没在 classpath 找到 jdbc.properties");
                return;
            }
            Properties p = new Properties();
            p.load(in);
            System.out.println("driver = " + p.getProperty("driver"));
            System.out.println("url    = " + p.getProperty("url"));
            System.out.println("user   = " + p.getProperty("username"));
            System.out.println("pwd    = " + (p.getProperty("password") != null ? p.getProperty("password") : "null"));
        }
    }
}
